package org.supreme.org.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.supreme.basic.result.JSONResult;
import org.supreme.org.domain.Employee;
import org.supreme.org.mapper.EmployeeMapper;
import org.supreme.org.service.IEmployeeService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.supreme.pet.domain.SearchMasterMsg;
import org.supreme.pet.mapper.SearchMasterMsgMapper;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author director
 * @since 2022-12-04
 */
@Service
public class EmployeeServiceImpl extends ServiceImpl<EmployeeMapper, Employee> implements IEmployeeService {
    @Autowired
    private EmployeeMapper employeeMapper;
    @Autowired
    private SearchMasterMsgMapper searchMasterMsgMapper;

    @Override
    public JSONResult rediect(Long id) {
        SearchMasterMsg searchMasterMsg = searchMasterMsgMapper.selectById(id);
        Employee employee=employeeMapper.selectShopId(searchMasterMsg.getShopId());
        employee.getUsername();
        return JSONResult.success(employee);
    }
}
